/*
package xiegd.study.bloom;


import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;

*/
/**
 * @Author: xieguangda
 * @Description:
 * @Date: 2023/4/23 14:47
 *//*

public class Test11 {
    public static void main(String[] args) {
        BloomFilter<Integer> integerBloomFilter = BloomFilter.create(
                //funnel是一个接口，用于将任意类型的对象转换为字节流
                //以使用于布隆过滤器的哈希计算
                Funnels.integerFunnel(),
                //插入数据条目数据
                4,
                //误判率
                0.8);

        //插入4个元素
        integerBloomFilter.put(1);
        integerBloomFilter.put(2);
        integerBloomFilter.put(3);
        integerBloomFilter.put(4);

        boolean b = integerBloomFilter.mightContain(6);
        System.out.println("是否存在32呢：" + b);
    }
}
*/
